<h1>Envelope</h1>

<p>Envelope is used to define an envelope which controls how a particular sound 
is played over time. Each Envelope defines a point in the envelope. A 
Sound contains an array of Envelopes which together define the complete envelope.</p>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">mark</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">32</td>
<td>The location in the playback sound data stream where the following level 
information applies.</td>
</tr>

<tr>
<td nowrap valign="top">left</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>The sound level for the left channel.</td>
</tr>

<tr>
<td nowrap valign="top">right</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>The sound level for the left channel</td>
</tr>

</table>

<p>The Flash Player plays sounds at a fixed rate of 44.1KHz, therefore sounds 
sampled at a lower frequency are interpolated with each sample repeated to 
generated the 44.1Khz playback rate. For example each sample in a sound sampled 
at 22KHz is played twice to generated the 44.1Khz playback rate.</p>

<p>The envelope defines the sample number (and hence the time) in the playback 
data stream where the level information applies and <b>not</b> the sample number 
in the original sound data. For example to set the level 0.1 seconds into a 
sound that plays for 1 second the value for the mark attribute in the envelope 
object would be 44100 * 0.1/1.0 = 4410.</p>

<h2>History</h2>

<p>Envelope represents the SoundEnvelope structure from the Macromedia Flash 
(SWF) File Format Specification. It was introduced in Flash 1.</p>
